<template>
	<checkbox-group @change="checkboxChange" style="display: flex;flex-wrap: wrap;">
		<label  v-for="item in items" :key="item.value" style="display: flex;margin-right: 10rpx;">
			<view>
				<checkbox :value="item.value" :checked="value.includes(item.value) " />
			</view>
			<view>{{item.name}}</view>
		</label>
	</checkbox-group>
</template>

<script>
	export default {
		props: {
			value: {
				type: Array,
				default: []
			},
			items: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				
			}
		},
		watch: {
		
		},
		methods: {
			checkboxChange(e) {			
				this.$emit('input', e.target.value)
			}
		}
	}
</script>

<style>

</style>
